import request from '@/utils/request'

// 查询厂家管理列表
export function listManufacturer(query) {
  return request({
    url: '/veterinary/manufacturer/list',
    method: 'get',
    params: query
  })
}

// 查询厂家管理详细
export function getManufacturer(manufacturerId) {
  return request({
    url: '/veterinary/manufacturer/' + manufacturerId,
    method: 'get'
  })
}

// 新增厂家管理
export function addManufacturer(data) {
  return request({
    url: '/veterinary/manufacturer',
    method: 'post',
    data: data
  })
}

// 修改厂家管理
export function updateManufacturer(data) {
  return request({
    url: '/veterinary/manufacturer',
    method: 'put',
    data: data
  })
}

// 删除厂家管理
export function delManufacturer(manufacturerId) {
  return request({
    url: '/veterinary/manufacturer/' + manufacturerId,
    method: 'delete'
  })
}

// 获取所有厂家列表（用于下拉选择）
export function getAllManufacturers() {
  return request({
    url: '/veterinary/manufacturer/all',
    method: 'get'
  })
}